Conversation
|
Currently, withdraw throws an error because I have not yet implemented it fully on the Adapter side, and I am unsure whether it is correctly implemented. Specifically, I want to make sure that the token has been generated and used correctly. I believe I will also need to add it as a signer for this to work. |
Looking further into the matter, I think this does work correctly. I have removed the error for now, but would like a second set of eyes to verify this. |
4c3c87b to
7bf006b
Compare
|
@PolarVoid Plz migrate to Lido v2 in this PR |
|
Hey @ironaddicteddog , I've migrated the code now |
bf551db to
7853a14
Compare
7654df6 to
aea3442
Compare
|
|
||
| break; | ||
| case SupportedProtocols.Lido: | ||
| this._metadata.vault = await lido.infos.getVault( |
There was a problem hiding this comment.
So in order to support validatorIndex in GatewayState:
- Add
validatorIndexas an optional field inDepositParams - Add
validatorIndexfield (metadata section) inGatewayParams(this is a work-around) - Update gatewayParams:
this.params.validatorIndex = depositParams.validatorIndex
7853a14 to
7eb7dfd
Compare
src/builder.ts
Outdated
| this._provider.connection, | ||
| withdrawParams.vaultId | ||
| ); | ||
| this.params.validatorIndex = withdrawParams.validatorIndex; |
There was a problem hiding this comment.
Perhaps add some descriptive comment here to explain the intention? Since this is a temporary work-around
| { | ||
| amount: new anchor.BN(params.withdrawAmount), | ||
| // Set validator index. | ||
| validatorIndex: heaviestValidatorIndex, |
There was a problem hiding this comment.
validatorIndex should be retrieved from params?
src/protocols/lido.ts
Outdated
|
|
||
| const heaviestValidator = vaultInfoWrapper.getHeaviestValidator(); | ||
|
|
||
| const heaviestValidatorIndex = vaultInfo.validators.entries.findIndex((value) => |
There was a problem hiding this comment.
move the heaviest validator logic over to DappioWonderland/navigator
in the Vault info wrapper itself
Gateway implementation of lido protocol, with support for both v1 and v2.